package com.timelyshopping.controller.user;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class UserLoginContorl {

	@RequestMapping(value = "/user/login", method = RequestMethod.POST)
	public ModelAndView myMethod(HttpServletRequest request,
			HttpServletResponse response,
			@PathVariable("username") String username,
			@PathVariable("password") String password, ModelMap modelMap)
			throws Exception {
		modelMap.put("username", username);
		return new ModelAndView("/main", modelMap);
	}
}
